import {axios} from '@/utils/request.js';

/**
 * 修改状态
 * @param params
 * @returns {AxiosPromise}
 */
export function changeQyzt(params) {
    return axios({
        url: "/vatoutinv/vmsFullBswjManager/updateById",
        method: 'get',
        params
    })
}

/**
 * 预览图片
 * @param params
 * @returns {AxiosPromise}
 */
export function previewImg(params) {
    return axios({
        url: "/vatoutinv/vmsFullBswjManager/getFileById",
        method: 'get',
        params
    })
}


/**
 * 查询列表
 * @param data
 * @returns {AxiosPromise}
 */
export function getList(data) {
    return axios({
        url: "/vatoutinv/vmsFullBswjManager/page",
        method: 'post',
        data
    })
}

/**
 * 预览图片
 * @param params
 * @returns {AxiosPromise}
 */
export function getFramedepartment(params) {
    return axios({
        url: "/vatoutinv/framedepartment/getFramedepartmentList",
        method: 'get',
        params
    })
}

/**
 * 文件上传 用于富文本上传图片
 * @param url
 * @param parameter
 * @returns {*}
 */
export function uploadAction(parameter) {
    return axios({
        url: "/vatoutinv/vmsFullBswjManager/save",
        data: (parameter),
        method: 'post',
        headers: {
            'content-type': 'multipart/form-data',  // 文件上传
        },
    })
}

/**
 * 删除
 */
export function deleteById(id) {
    return axios({
        url: "/vatoutinv/vmsFullBswjManager/deleteFileById?id=" + id,
        method: 'get'
    })

}

export function changeZt(params) {
    return axios({
        url: '/vatoutinv/vmsFullBswjManager/updateStatus?id=' + params.id + '&status=' + params.status + '&type=' + params.type,
        method: 'post',
    })
}

export function getDetail(bswjId) {
    return axios({
        url: '/vatoutinv/vmsFullBswjManager/getInfoByBswjId?bswjId=' + bswjId,
        method: 'get',
    })
}